package com.adjaisd.scarecrow.service;

import com.adjaisd.scarecrow.dto.DeviceStatusDTO;
import com.adjaisd.scarecrow.entity.DeviceStatus;
import com.adjaisd.scarecrow.vo.DeviceQuotaAlarmVO;
import com.adjaisd.scarecrow.vo.DeviceStatusVO;
import com.adjaisd.scarecrow.vo.Pager;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author adjaisd
 * @since 2022-03-27
 */
public interface DeviceStatusService extends IService<DeviceStatus> {

    DeviceStatus getDeviceStatusByID(Long deviceId);

    boolean setStatus(Long deviceId, Boolean status);

    boolean updateTag(Long deviceId, String tag);

    boolean addDeviceStatus(DeviceStatus deviceStatus);

    boolean saveDeviceInfo(DeviceStatusDTO deviceStatusDTO);

    void updateOnLineByID(Long deviceId, boolean online);

    Pager<DeviceStatusVO> queryPage(long userId, long page, long pageSize, String number, String tag, int state);

    /**
     * 查询设备详情
     *
     * @param userId
     * @param page
     * @param pageSize
     * @param number
     * @param tag
     * @param state
     * @return
     */
    Pager<DeviceQuotaAlarmVO> queryDeviceQuotaAlarm(Long userId, Long page, Long pageSize, String number, String tag, Integer state);


}
